home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form pic9_1_2
- Caption = "Fixed-length Strings"
- ClientHeight = 1620
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 3135
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1620
- ScaleWidth = 3135
- Begin VB.PictureBox picOutput
- BeginProperty Font
- Name = "Courier New"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1335
- Left = 840
- ScaleHeight = 1275
- ScaleWidth = 2115
- TabIndex = 1
- Top = 120
- Width = 2175
- End
- Begin VB.CommandButton cmdGo
- Caption = "Go"
- Height = 495
- Left = 120
- TabIndex = 0
- Top = 360
- Width = 615
- End
- Attribute VB_Name = "pic9_1_2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdGo_Click()
- 'Illustrate fixed-length strings
- Dim town As String
- Dim city As String * 9
- Dim municipality As String * 12
- town = "Chicago"
- city = "Chicago"
- municipality = "Chicago"
- picOutput.Cls
- If (city = town) Or (city = municipality) Then
- picOutput.Print "same"
- Else
- picOutput.Print "different"
- End If
- picOutput.Print "123456789012345"
- picOutput.Print city & "***"
- picOutput.Print town & "***"
- picOutput.Print municipality & "***"
- End Sub
-